package test06;

import java.util.Comparator;

/**
 * @Author lzp
 * @Date 2024-04-11
 */
public class test {
    public static void main(String[] args) {
        // int compare(T o1, T o2);
        Comparator<Integer> comparator = (o1,o2) -> o1-o2;



        /*
        Comparator<Integer> comparator2 = (x,  y) -> {
            return (x < y) ? -1 : ((x == y) ? 0 : 1);
        };
        */
        //方法引用
        Comparator<Integer> comparator1 = Integer::compare;
        // byte compare(int x, int y)
        // Integer.compare()
    }
}
